Jump to content

Upgrading 4.3 C++ Projects to 4.4


Josh
 Share

Recommended Posts

The following changes are needed to update your C++ projects from 4.3 to 4.4:

Visual Studio

Add these include header search directories:

  • $(LeadwerksHeaderPath)\Libraries\NewtonDynamics\packages\thirdParty\timeTracker

Add these input libraries:

  • newton_d.lib;dContainers_d.lib;dCustomJoints_d.lib; (debug)
  • newton.lib;dContainers.lib;dCustomJoints.lib; (release)

Code::Blocks

Add these include header search directories:

  • $(LeadwerksPath)/Include/Libraries/NewtonDynamics/packages/thirdParty/timeTracker

Add this library in the linker settings:

  • libcurl

You also need the dev files for libcurl:

sudo apt-get install libcurl4-openssl-dev

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • Josh pinned this topic

You should put the libs into Leadwerks.h with pragma comment:

If you add the following to the beginning of Leadwerks.h, it will automatically tell the linker that these libs are needed. So you do not need to add them to the linker settings for every project individually. (You will have to add the include header search directories, though, since there is sadly no pragma for this):

 

#pragma comment(lib, "libcryptoMT.lib")
#pragma comment(lib, "libsslMT.lib")
#pragma comment(lib, "Rpcrt4.lib")
#pragma comment(lib, "crypt32.lib")
#pragma comment(lib, "libcurl.lib")
#pragma comment(lib, "lua51.lib")
#pragma comment(lib, "msimg32.lib")
#pragma comment(lib, "steam_api.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Glu32.lib")
#pragma comment(lib, "Leadwerks.lib")
#pragma comment(lib, "OpenAL32.lib")
#pragma comment(lib, "OpenGL32.lib")
#pragma comment(lib, "winmm.lib")
#pragma comment(lib, "Psapi.lib")

#ifdef DEBUG
	#pragma comment(lib, "libovrd.lib")
	#pragma comment(lib, "newton_d.lib")
	#pragma comment(lib, "dContainers_d.lib")
	#pragma comment(lib, "dCustomJoints_d.lib")
#else
	#pragma comment(lib, "libovr.lib")
	#pragma comment(lib, "newton.lib")
	#pragma comment(lib, "dContainers.lib")
	#pragma comment(lib, "dCustomJoints.lib")
#endif

 

This makes updating projects more easy (I only tried it in Visual Studio and I don't believe gcc honors these pragmas, so if you are developing on linux, you need to add the libraries yourself, like it is right now).

  • Upvote 1
Link to comment
Share on other sites

All this looks too complex for me Can we just start a new project and move all our files etc over to that?

I have learned c++ ( almost) but this kind of thing always gives me loads of trouble.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Link to comment
Share on other sites

When upgrading your project:

- Close Visual Studio

- navigate to [your project]\Projects\Windows\

-rename the newly updated xxxxx.vcxproj file to something else ie xxxxx.vcprojct.aaa

- rename the xxxxx.vcxproj.BAK file back to xxxx.vcxproj

- Reopen the project in Visual Studio. That will bring back in all your files etc.

Add in the includes and links that Josh mentions, rebuild and your done.

 

This is much easier than creating a new project and moving everything.

 

trindieprod.png?dl=0spacer.png?dl=0steam-icon.png?dl=0twitter-icon.png?dl=0spacer.png?dl=0
Link to comment
Share on other sites

  • Josh unpinned this topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...