Creating new VC++express project with jucer files


#1

Hi,

I’ve had some sucess with JUCE (built a vst a month or two ago). I’m trying to use the Jucer now but I’ve hit a stumbling block with VC++ express again. Is it just me or is all the setting up projects part of visual studio completely unintuative.

anyway.

the jucer compiles fine and I can create components and save them fine which creates the .h and .cpp file.

I understand that I want to add these files to a new project in a new solution.

I have tried creating a win32 project which automatically creates lots of files including the stdafx.h file among others. when I add my jucer created .h and .cpp files to this project it gives me an include error.

basically I need to know what the high level steps I should be doing are. I can work through the linking errors etc as long as I know what I should be doing. for instance my new solution should, I imagine, include the whole juce library?
I have been trying to create a new solution as I want to create my projects in my code folder so I can have them outside of the juce folders.

any help in what steps I should take much appreciated.


#2

You have to select win32 project, VS would show another dialog in this dialog “application settings”, the dialog would refresh and show few options in that select 'additional options" select “empty project”.

If your code uses juce you would have to include both juce header and the library.

Your project can be anywhere as long as you give correct path to the header file and libraries in the project settings.

Hope it helps you. :slight_smile:


#3

right I’m confused here. I can build the starter project that is stickyed in the genreal juce discussion page. basically I create a blank project and put in the four files and change it not to be a dll and it works fine becuase the juce directory is included in my default project includes.

however when I create a really simple jucer app and save the files and paste them into a project in exactly the same way I get the following linking error. is there an extra directory that files from the jucer need, surely not? any help appreciated

error pasted below

1>------ Build started: Project: yata, Configuration: Debug Win32 ------
1>Compiling…
1>hlsJucerComponent2.cpp
1>JUCE! Library to link to: jucelib_static_Win32_debug.lib
1>Compiling manifest to resources…
1>Microsoft ® Windows ® Resource Compiler Version 6.0.5724.0
1>Copyright © Microsoft Corporation. All rights reserved.
1>Linking…
1>LIBCMTD.lib(wincrt0.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>D:\C++\code\yata\Debug\yata.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://d:\C++\code\yata\yata\Debug\BuildLog.htm"
1>yata - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


#4

go to project settings-> configuration properties->Linker->Input

put “LIBCMTD.lib” in ignore Specific Library in debug settings
for release put “LIBCMT.lib” in ignore Specific Library.


#5

hi thanks for that idea but it didn’t seem to work… i get the following enourmous list of errors when trying to build.

1>------ Build started: Project: yata, Configuration: Debug Win32 ------
1>Linking…
1>jucelib_static_Win32_debug.lib(juce_ScrollBar.obj) : error LNK2019: unresolved external symbol ___security_cookie referenced in function “public: __thiscall juce::ScrollBar::ScrollBar(bool,bool)” (??0ScrollBar@juce@@QAE@_N0@Z)
1>jucelib_static_Win32_debug.lib(juce_DropShadowEffect.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_SVGParser.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_DrawableImage.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_GZIPDecompressorInputStream.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_InputStream.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_GZIPCompressorOutputStream.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_FileOutputStream.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_BubbleComponent.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_Drawable.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_StretchableObjectResizer.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_ChangeListenerList.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_ProgressBar.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_UndoManager.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_Viewport.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_PopupMenu.obj) : error LNK2001: unresolved external symbol ___security_cookie
1>jucelib_static_Win32_debug.lib(juce_OutputStream.obj) : error LNK2001: unresolved external symbol ___security_cookie


1>jucelib_static_Win32_debug.lib(juce_SVGParser.obj) : error LNK2019: unresolved external symbol _acos referenced in function “private: static void __cdecl juce::SVGState::endpointToCentreParameters(double,double,double,double,double,bool,bool,double &,double &,double &,double &,double &,double &)” (?endpointToCentreParameters@SVGState@juce@@CAXNNNNN_N0AAN11111@Z)
1>OLDNAMES.lib(stricmp.obj) : error LNK2001: unresolved external symbol __stricmp
1>OLDNAMES.lib(strnicmp.obj) : error LNK2001: unresolved external symbol __strnicmp
1>OLDNAMES.lib(strupr.obj) : error LNK2001: unresolved external symbol __strupr
1>OLDNAMES.lib(strlwr.obj) : error LNK2001: unresolved external symbol __strlwr
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol “public: __thiscall std::exception::exception(char const * const &,int)” (??0exception@std@@QAE@ABQBDH@Z) referenced in function “public: __thiscall std::bad_alloc::bad_alloc(void)” (??0bad_alloc@std@@QAE@XZ)
1>D:\C++\code\yata\Debug\yata.exe : fatal error LNK1120: 130 unresolved externals


#6

libcpmtd.lib

go to project settings-> configuration properties->Linker->Input

put “LIBCMTD.lib” and “libcpmtd.lib” in ignore Specific Library in debug settings
for release put “LIBCMT.lib” and “libcpmt.lib” in ignore Specific Library.

and also rebuild juce once.


#7

hmm no luck.

I opened my JUCE project and checked in there i already had

libcmt.lib, msvcrt.lib ignored, I added libcmtd.lib and rebuilt. no problems

  • something I don’t understand though is that the JUCE project doesn’t have a linker directory. however under librarian-> general there is an option to ignore specific libraries (this is where the option to ignore libcmt.lib and msvcrt.lib was)

anyway after rebuliding juce with the new ignored library I tried to rebuild my really simple JUCER app and I get exactly the same problem. This makes no sense what are these two files doing differently to my other juce projects? I’m confused


#8

it looks like it’s release setting and not debug setting

libcmt.lib -> debug version -> libcmtd.lib.

Am a little confused now, There is one solution you can try,

see the project settings for this project copy all the linker data other than the linker paths.


#9

try this link

http://lists.live555.com/pipermail/live-devel/2008-July/009115.html


#10


http://msdn.microsoft.com/en-us/library/8dbf701c(vs.71).aspx

sorry, for too many post, trying to help you as much as possible. :slight_smile:


#11

thanks for trying to help but I do not see any refernce to a problem similar to mine in those links?