User forums > Using Code::Blocks
multiple file c++ project
Robert_S:
Hmm... I don't have that header on my system, so I guess it belongs to the package you want to compile. In this case, you probably want to add the folder that contains all the project's includes to the compiler's search path.
That's correct the header is part of the package and is present in the source folder. How do I add the include in the compilers search path? Is that Settings->Global Variables and then enter folder path in the include field? I've just tried this to no avail.
UPDATE: I uninstalled rc2 as suggested and installed and configured the latest nightly build. I still get the error message "aconf.h: No such file or directory" I hope that somebody can steer me in the right direction.
I'd be very grateful. At this stage my aim is to have an IDE that I am comfortable with using and be able to compile this project and have a play with it to learn how it works.
I hope that somebody can steer me in the right direction.
Thankyou,
Robert.
thomas:
I've had a look at this package now, and I don't think you will be able to easily compile it, if you're a beginner.
First of all, it has a terrible project layout, you need to add a couple of search paths, and you have to sort out files that don't belong into your project. Also, you must rename aconf-win32.h as you have already done.
Half of the package depends on additional packages (which you probably don't have) or on X11 specific stuff, so you can't just compile everything. You have to look at the ms_make.bat and only add the files that are listed there, and you have to sort them into individual targets.
I have attached a project file that does most of this and compiles about half of it (the goo, fofi, and splash libs) successfully. Not knowing what the xpdf software looks like, I've put the rest into one target, which of course fails with "multiple definitions of main()" as there are 4-5 subprograms in it, actually.
You will have to put pdfopts.cc, pdfinfo.cc, pdffonts.cc, and pdfimages.cc into separate targets, creating separate programs. Still a lot of work, but you get the idea... duplicate the xpdf target 4 times, change the output filename accordingly, and make sure only one of the forementioned sources is checked for each target. Maybe using the attached project is nevertheless helpful.
Also, at the very end, it complains about something missing... but I have given up :)
[attachment deleted by admin]
thomas:
Oh, I forgot... you must add goo and fofi (and possibly splash) to the link libraries for the targets that build the 4-5 executables, else you will get missing references.
Robert_S:
Please accept my apologies I've created a new thread by accident can a moderator move this to my original thread please? Thanks for your patience.
--- Quote from: thomas on September 04, 2007, 11:22:03 am ---I've had a look at this package now, and I don't think you will be able to easily compile it, if you're a beginner.
First of all, it has a terrible project layout, you need to add a couple of search paths, and you have to sort out files that don't belong into your project. Also, you must rename aconf-win32.h as you have already done.
--- End quote ---
Hi Thomas thankyou for taking the time to look at this. I now know to add the seach paths with the global compiler settings, previously I had copied all files to a single folder.
--- Quote from: thomas on September 04, 2007, 11:22:03 am ---Half of the package depends on additional packages (which you probably don't have) or on X11 specific stuff, so you can't just compile everything. You have to look at the ms_make.bat and only add the files that are listed there, and you have to sort them into individual targets.
--- End quote ---
The X11 specific stuff is only for only for xpdf itself and for running under XWindows. I used the mas_make.bat file as a guide to what files I need to add to the project workspace.
--- Quote from: thomas on September 04, 2007, 11:22:03 am ---I have attached a project file that does most of this and compiles about half of it (the goo, fofi, and splash libs) successfully. Not knowing what the xpdf software looks like, I've put the rest into one target, which of course fails with "multiple definitions of main()" as there are 4-5 subprograms in it, actually.
You will have to put pdfopts.cc, pdfinfo.cc, pdffonts.cc, and pdfimages.cc into separate targets, creating separate programs. Still a lot of work, but you get the idea... duplicate the xpdf target 4 times, change the output filename accordingly, and make sure only one of the forementioned sources is checked for each target. Maybe using the attached project is nevertheless helpful.
Also, at the very end, it complains about something missing... but I have given up :)
--- End quote ---
I'm only looking to compile pdfinfo.cc, sorry I should have mentioned this from the outset. If I
--- Quote from: thomas on September 04, 2007, 11:22:03 am ---Half of the package depends on additional packages (which you probably don't have) or on X11 specific stuff, so you can't just compile everything. You have to look at the ms_make.bat and only add the files that are listed there, and you have to sort them into individual targets.
I have attached a project file that does most of this and compiles about half of it (the goo, fofi, and splash libs) successfully. Not knowing what the xpdf software looks like, I've put the rest into one target, which of course fails with "multiple definitions of main()" as there are 4-5 subprograms in it, actually.
You will have to put pdfopts.cc, pdfinfo.cc, pdffonts.cc, and pdfimages.cc into separate targets, creating separate programs. Still a lot of work, but you get the idea... duplicate the xpdf target 4 times, change the output filename accordingly, and make sure only one of the forementioned sources is checked for each target. Maybe using the attached project is nevertheless helpful.
Also, at the very end, it complains about something missing... but I have given up :)
--- End quote ---
I've nearly got it to compile now now thanks to your help. The only error I get now is:
-------------- Build: Debug in pdfinfo ---------------
Compiling: ..\gmempp.cc
Linking console executable: bin\Debug\pdfinfo.exe
obj\Debug\GlobalParams.o: In function `ZN11WinFontListC2EPc':C:/xpdf-3.02/xpdf/GlobalParams.cc:284: undefined reference to `EnumFontsA@16'
obj\Debug\GlobalParams.o: In function `ZN11WinFontListC1EPc':C:/xpdf-3.02/xpdf/GlobalParams.cc:284: undefined reference to `EnumFontsA@16'
obj\Debug\GlobalParams.o: In function `ZN11WinFontList9enumFunc1EPK11tagLOGFONTAPK14tagTEXTMETRICAml':C:/xpdf-3.02/xpdf/GlobalParams.cc:382: undefined reference to `EnumFontsA@16'
obj\Debug\pdfinfo.o: In function `ZN6Object9getStringEv':C:/xpdf-3.02/xpdf//GString.h:(.text+0xa3): undefined reference to `parseArgs'
:C:/xpdf-3.02/xpdf//GString.h:(.text+0x13f): undefined reference to `printUsage'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings
I'm really not sure how to proceed from here. Can you or anyone help please?
thomas:
Add gdi32 to link libraries.
http://msdn2.microsoft.com/en-us/library/ms533964.aspx
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version