I use qmake. I have the following project structure:
/
|_SFMLWidgets
| |_...
| |_View.h
| |_View.cpp
| \_...
|
|_MapEditor
| |_...
| |_View.h
| |_View.cpp
| \_...
|
\_main.cpp
This views do different things. When I try to compile project I get compilation errors:
overriding recipe for target 'debug/View.o'
ignoring old recipe for target 'debug/View.o'
It happens because both views are builded in same directory. Is there any way to specify different build dirrectories?
I want something like:
/
|_debug
|_SFMLWidgets
| |_...
| |_View.o
| \_...
|
|_MapEditor
| |_...
| |_View.o
| \_...
|
|_main.o
\_main.exe
My .pro file
You can put each of SFMLwidgets and MapEditor in separate subdirs qmake project files. Shared configuration of the two subprojects can go into a pri file.
Related
I try to implement a testing framework using shellspec.
I have read the article and README at shellspec github project.
But I`m still confused about how to customise projects directories.
I`d like to have the next structure of my testing framework:
<root_dir>
|-- README
|
|-- tests
|
|-- test_instance_1
| |
| |-- lib
| | |
| | |-- my_test_1.sh
| |
| |-- spec
| |
| |-- my_test_1_spec.sh
|
|
|-- test_instance_2
|
|-- lib
| |
| |-- my_test_2.sh
|
|-- spec
|
|-- my_test_2_spec.sh
As it is mentioned at shellspec github project, it is possible to customise directory structure:
This is the typical directory structure. Version 0.28.0 allows many of
these to be changed by specifying options, supporting a more flexible
directory structure.
So I tried to modify my .shellspec file in the following way:
--default-path "***/spec"
--execdir #basedir/lib`
But when I run shellspec command in my command line, I get the next errors:
shellspec.sh: eval: line 23: unexpected EOF while looking for matching ``'
shellspec.sh: eval: line 24: syntax error: unexpected end of file
shellspec is run in <root_dir>.
Also I saw that there should be .shellspec-basedir file in each subdirectory, but I don`t realise, what it should contain.
I'd be happy, if someone give an example of existing project with custome directory structure or tell me, what I`m doing wrong.
The answer turned out to be very simple. Need to use
--default-path "**/spec"
to find _spec.sh files in all spec/ directories in the project
I want to use tesseract api on my project. And the problem is I can't compile my test code that look like this.
#include <iostream>
#include <tesseract/baseapi.h>
#include <leptonica/allheaders.h>
int main()
{
tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
api->End();
delete api;
return 0;
}
I'm using this
g++ -L/Projects/cpp/CPE1/Project/lib/ -ltesseract50 -lleptonica -I/Projects/cpp/CPE1/Project/include t.cpp -o t
and got
C:\Users\MSINOT~1\AppData\Local\Temp\cc4xWMfF.o:t.cpp:(.text+0x21): undefined reference to `tesseract::TessBaseAPI::TessBaseAPI()'
C:\Users\MSINOT~1\AppData\Local\Temp\cc4xWMfF.o:t.cpp:(.text+0x44): undefined reference to `tesseract::TessBaseAPI::End()'
collect2.exe: error: ld returned 1 exit status
my folder structure looks like this (this is all on drive D:)
\---Project
+---bin
+---cmake
+---include
| +---leptonica
| \---tesseract
+---leptonica-1.80.0
+---lib
| +---cmake
| \---pkgconfig
+---tesseract-master
\---Uics
[my code is here]
I compiled leptonica and tesseract following this https://tesseract-ocr.github.io/tessdoc/Compiling.html#windows on "Develop Tesseract" and specify install path to my project folder.
I'm a noob in this type of problem, so if you have completely different ways to use tesseract API pls tell me.
g++.exe (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 8.1.0
Tesseract from main branch https://github.com/tesseract-ocr/tesseract
Leptonica from 1.80.0 release
https://github.com/DanBloomberg/leptonica
cmake version 3.19.4
*edit add lib folder listing
D:\PROJECTS\CPP\CPE1\PROJECT\LIB
| leptonica.lib
| tesseract50.lib
|
+---cmake
| +---leptonica
| | LeptonicaConfig-version.cmake
| | LeptonicaConfig.cmake
| | LeptonicaTargets-release.cmake
| | LeptonicaTargets.cmake
| |
| \---tesseract
| TesseractConfig.cmake
| TesseractConfigVersion.cmake
| TesseractTargets-release.cmake
| TesseractTargets.cmake
|
\---pkgconfig
lept.pc
tesseract.pc
I have a large directory structure, typical of most apps.
For example, like this:
theprojectroot
|- src
| |- app
| | |- index.html
| | |- index.js
| | |- userhome
| | | |- userhome.html
| | | |- userhome.js
| | |- management
| | | |- management.html
| | | |- management.js
| | |- social
| | | |- social.html
| | | |- social.js
| |- assets
|- vendor
|- package.json
I would like to copy all the HTML files - and ONLY the HTML files - in all the directories into another folder.
I'm currently using Grunt copy to copy all files, but now I'd like to do so just for the HTML. In the docs, there doesn't seem to be any option to select a file type.
Does anyone have a hack they could suggest to do this?
The following code will work
copy: {
files: {
cwd: 'path/to/files', // set working folder / root to copy
src: '**/*.html', // copy all files and subfolders **with ending .html**
dest: 'dist/files', // destination folder
expand: true // required when using cwd
}
}
The flatten: true option as in this answer might work for some cases, but it seems to me that the more common requirement (as in my case) is to copy a folder and its sub-folder structure, as-is, to dest. It seems that in most cases if you have sub-folders, they are probably being referenced that way in code. The key to doing this is the cwd option, which will preserve folder structure relative to the specified working directory:
copy: {
files: {
cwd: 'path/to/files', // set working folder / root to copy
src: '**/*.html', // copy only html files
dest: 'dist/files', // destination folder
expand: true // required when using cwd
}
}
upon deployment in production, I get this error , I don't understand where is coming from this 5.5.30... but I uninstalled the gem locally (oSX) and remotely (Debian) and reinstalled it... so it should be compiled with the latest libraries.. 5.6.19
here are both MySQL versions installed ...
on Debian
mysql -u root -p -e 'SHOW VARIABLES LIKE "%version%";'
Enter password:
+-------------------------+-------------------+
| Variable_name | Value |
+-------------------------+-------------------+
| innodb_version | 5.6.19 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.6.19-1~dotdeb.1 |
| version_comment | (Debian) |
| version_compile_machine | x86_64 |
| version_compile_os | debian-linux-gnu |
+-------------------------+-------------------+
on OSX
yves$ mysql -u root -p -e 'SHOW VARIABLES LIKE "%version%";'
Enter password:
+-------------------------+------------------------------+
| Variable_name | Value |
+-------------------------+------------------------------+
| innodb_version | 5.6.19 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.6.19 |
| version_comment | MySQL Community Server (GPL) |
| version_compile_machine | x86_64 |
| version_compile_os | osx10.7 |
+-------------------------+------------------------------+
I'm currently working on developing a personal Django site that will consist of various technologies / subdomains. My main page(s) will be Django, with a blog.blah.com subdomain that runs wordpress, and several other subdomains for projects (project1.blah.com, project2.blah.com), that are static HTML files (created with Sphinx).
I'm having a lot of trouble organizing my file hierarchy and web server configurations. I'm currently running Apache on port 8080 which serves the Django stuff via mod_wsgi, and I use NGINX on port 80 to handle requests and proxying.
Here's my current filesystem layout. NOTE: I run ALL websites under a single user account.
blah#blah:~$ tree
.
`-- sites
|-- blah.org
| |-- logs
| |-- blah
| | |-- apache
| | | |-- blah.conf
| | | `-- blah.wsgi
| | |-- INSTALL
| | |-- nginx
| | | `-- blah.conf
| | |-- blah
| | | |-- app1
| | | | `-- models.py
| | | |-- app2
| | | | `-- models.py
| | | |-- manage.py
| | | |-- settings.py
| | | `-- urls.py
| | `-- README
| `-- private
`-- blah2.org
Can anyone help me figure out where to place files for a best-practices type of deployment? The structure above ONLY contains my Django code. I've got no idea where to put my static content files (eg: html subdomain sites), and my other services (eg: wordpress stuff).
Any help would be greatly appreciated! Bonus points if you show off your directory structure.
I put my stuff in /srv/www/blah.org/ like this:
-- blah.org
| -- media
| -- amedia
| -- templates
| -- blah
| django app
...
| -- settings.py
| -- config
| -- crontab
| -- blag.org.conf (nginx)
| -- manage.py
Then I confiugure static /media/ and /amedia/ with nginx and proxy everything else to gunicorn serving django.