Development reference: Difference between revisions
No edit summary |
No edit summary |
||
Line 97: | Line 97: | ||
|- | |- | ||
| | | | ||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! c++ Create a portable C++ project in Visual Studio | |||
|- | |||
| | |||
If you don't have existing code, it's probably best to create a project_name.cpp file with your main() function. | |||
int main( int argc, char * argv[] ) | |||
{ | |||
return 0; | |||
} | |||
Then in Visual Studio... | |||
File->New->Project from existing code | |||
C++ | |||
(then use mostly defaults on this page, once you provide file location and project name) | |||
Project file location: <base>\project_name | |||
Project name: project_name | |||
[x] Add files from these folders | |||
Add subs | |||
[x] <base>\project_name | |||
NEXT | |||
Use Visual Studio | |||
Console application project | |||
No ATL, MFC, CLR | |||
NEXT | |||
NEXT | |||
FINISH | |||
Then add Reusable and boost include and lib paths: | |||
Example if you built boost according to notes below: | |||
Project->Properties->All Configurations->Configuration Properties->VC++ Directories->Include Directories-> | |||
$(VC_IncludePath);$(WindowsSDK_IncludePath);..\..\..\Reusable\c++ | |||
INCLUDE: C:\Software Development\boost_1_53_0 | |||
LIB: C:\Software Development\boost_1_53_0\stage\lib | |||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! boost release and debug build for linux | |||
|- | |||
| | |||
# download latest boost, eg: boost_1_59_0 | |||
m@wallee:~/development$ 7z x boost_1_59_0.7z | |||
cd boost_1_##_0 | |||
build_boost_release_and_debug.sh | |||
# then patch .bashrc as instructed | |||
# eclipse and server/nix/bootstrap.sh are customized to match | |||
To upgrade a project: | |||
cd nix | |||
make distclean # removes nasty .deps folders that link to old boost if you let them | |||
make clean # removes .o files etc | |||
cd ../build-Release && make distclean && make clean | |||
cd ../build-Debug && make distclean && make clean | |||
cd .. | |||
./bootstrap force release | |||
./bootstrap force debug | |||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! boost release and debug build for Windows | |||
|- | |||
| Open a VS2015 x64 Native Tools Command Prompt. | |||
EITHER: for new installs, you have to run bootstrap.bat first, it will build b2; | |||
OR: for reruns, remove boost dirs: [bin.v2, stage]. | |||
Then build 64-bit: | |||
cd "....\boost_1_59_0" | |||
b2 toolset=msvc variant=release,debug link=static address-model=64 | |||
rem trying to avoid excessive options, assuming I don't need these: threading=multi | |||
(old stuff) | |||
--toolset=msvc-14.0 address-model=64 --build-type=complete --stagedir=windows_lib\x64 stage | |||
Now open VS2013 x86 Native Tools Command Prompt and build 32-bit: | |||
cd "C:\Michael's Data\development\sixth_column\boost_1_55_0" | |||
bjam --toolset=msvc-12.0 address-model=32 --build-type=complete --stagedir=windows_lib\x86 stage | |||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" | {| class="mw-collapsible mw-collapsed wikitable" | ||
! c++11 containers | ! c++11 containers | ||
Line 464: | Line 533: | ||
recompile! should be clean | recompile! should be clean | ||
vs will recognize C files and compile accordingly | vs will recognize C files and compile accordingly | ||
|} | |} | ||
Revision as of 16:39, 4 January 2016
Patterns | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
C++ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
JavaScript | ||||||
---|---|---|---|---|---|---|
|
git | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Eclipse | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
misc | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|