VS2013 Question

Started by
1 comment, last by EarthBanana 10 years, 2 months ago

This may seem like a silly question - but if you have one solution with multiple projects in VS2013 - does anyone know how to get the source code from another project linked in..

i.e. I have a project called Toolkit and a project called Engine... From the toolkit project I want to use all the code in the Engine project without having to make a library from the engine code...

I added the directory with the engine header files to the toolkit project's include directories, added the directory with the source code to the toolkit project's source and executable directories.. Intellisense works and everything compiles (and I see the output saying that engineblabla.cpp compiled) but I am getting linking errors anytime I try to use any of the engine's functions or classes.. I know that it must be compiling to object code that the project doesn't know how to link to but I can't figure out how to set it up so it does.

Any help is appreciated, thanks

Advertisement

Without knowing the error code you get, be sure you set the additional library path in the correct way. http://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&l=EN-US&k=k(VC.Project.VCLinkerTool.AdditionalLibraryDirectories)&rd=true

Pay also attention on the projects configuration and platform settings (a good solution could be using the internal VS macros like %(Configuration) and %(Project) ), be sure also the various configuration and platform builds are setted in appropriate and consistent way (ie: Win32 and x64 configurations path are different as default).

"Recursion is the first step towards madness." - "Skegg?ld, Skálm?ld, Skildir ro Klofnir!"
Direct3D 12 quick reference: https://github.com/alessiot89/D3D12QuickRef/

Thanks for the reply - I found a solution that works.. I had all the lib directories and everything set up right but it still wouldnt work correctly

What ended up working was I just added the source files from the Engine project in to the Toolkit project as "existing items" - this makes it so it is referencing the Engine source files correctly and if I change the engine source the Toolkit will have that same change

This topic is closed to new replies.

Advertisement