Author Topic: Win32 GUI, unviewable link libraries questions.  (Read 8077 times)

Offline Joshua Flynn

  • Multiple posting newcomer
  • *
  • Posts: 16
Win32 GUI, unviewable link libraries questions.
« on: August 27, 2012, 12:06:54 am »
Hi. I've tried to read the code blocks wiki page for help, and I've tried to search online for answers to my questions (and I keep finding answers that either aren't related or produce stuff I already know). I was thinking of inquiring on a coding forum for the answer, but I realise that technically speaking it's not a coding issue (the code works fine), and that I'd be faster if I ask the people who build code block as to what works under the covers.


Now that you know I've tried not to ask here first, please don't write off my question with a wikipedia page reference.

I got some windows code. Yes, I know code blocks isn't a compiler. The code works, but the code also doesn't work (what do I mean?). I have a project that started out as a default console application. Now I assume code blocks does something out of sight when setting up the projects (and this is why I need someone who knows code blocks inside out and not a coder).

The windows code doesn't work in the default console application (not a compiler, I know), but it does work in a default win32 GUI project. And it's not the header files (they have the same header files).

And I cannot start with a win32 GUI project - the console application based project I've working on for about a year and there's a lot of files and settings. I'd much rather just copy the settings that allow the win32 GUI project to work over to the other one than config a new project.


  • My question is, what does code blocks do to the win32 GUI project that it doesn't do with the console application project? Or to put it bluntly, why does my windows code work with the win32 GUI project and not the default console application even if they have the same headers?

  • And for some strange reason, (another question), none of the flags settings I've set on my projects display under build options->linker settings (both link libraries and other linker options is blank, even though I've previously added external libraries and they do compile normally as if there), how do I fix this issue?

As a side-note, I would check the libraries the win32 GUI uses but for some reason they don't display for me under the linker settings. Actually, most of the projects have this issue for some bizarre reason.
« Last Edit: August 27, 2012, 12:09:39 am by Joshua Flynn »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

zabzonk

  • Guest
Re: Win32 GUI, unviewable link libraries questions.
« Reply #2 on: August 27, 2012, 12:57:59 am »
Go to the project|Properties menu, and then in the dialog go to the Build Targets tab - you can change the type of thing you are building using the Type: dropdown, along with much else. To see exactly what the compiler, linker etc. are doing, simply look at the build log - CB is not doing any magic.
« Last Edit: August 27, 2012, 01:03:11 am by Neil Butterworth »

Offline Joshua Flynn

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Win32 GUI, unviewable link libraries questions.
« Reply #3 on: August 27, 2012, 01:09:37 am »
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F


Now that you know I've tried not to ask here first, please don't write off my question with a wikipedia page reference.

I've tried to read the code blocks wiki page for help

The wiki page link doesn't answer either question either (linker settings not displaying != compile error). I know what the compiler error is about (there's something missing - I figure a library), and I know where to find the answer to the missing item (it's in win32 GUI), but because the win32 project is built using an automated process - I don't know what it contains or what settings it has, and I don't know anyone else (who isn't on this forum) who knows what it contains or how it is set-up (but the code blocks team do - they wrote the project creation system, hence why I'm asking here).

That and I can't even see my linker settings in code blocks. Which is definitely an IDE problem.

Believe me, I'd much rather figure it out for myself rather than deal with people passing me unhelpful links or berating me but unless someone can suggest an alternative line of inquiry that produces the desired results (fixing the linker settings not displaying correctly and telling me how win32 GUI is configured), giving me a irrelevant link (I haven't posted any code and I am not asking anyone to debug any code) is not going to be constructive.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Win32 GUI, unviewable link libraries questions.
« Reply #4 on: August 27, 2012, 01:57:24 am »
Please learn to follow and read the links posted to help you.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Joshua Flynn

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Win32 GUI, unviewable link libraries questions.
« Reply #5 on: August 27, 2012, 02:28:23 am »
Go to the project|Properties menu, and then in the dialog go to the Build Targets tab - you can change the type of thing you are building using the Type: dropdown, along with much else. To see exactly what the compiler, linker etc. are doing, simply look at the build log - CB is not doing any magic.

This solved the win32 issue, thank you.

The linker settings still do not display though (if I open the .cbp in notepad, the options are noted in the text under <linker> but in code blocks it's a blank box).

Offline Joshua Flynn

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Win32 GUI, unviewable link libraries questions.
« Reply #6 on: August 27, 2012, 02:31:00 am »
Please learn to follow and read the links posted to help you.

Tim S.

I had read it. Your link was about compiler errors. That did not help.

I am not getting compiler errors.

(Outputting the commands won't help because I need to know what GUI settings to change if that's what you meant.)
« Last Edit: August 27, 2012, 02:33:36 am by Joshua Flynn »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Win32 GUI, unviewable link libraries questions.
« Reply #7 on: August 27, 2012, 06:30:12 am »
C::B does not do any magic behind the scenes, at least not for the project templates.
Everything i in the project files.

Are you aware, that you can set up the options for the whole project and for every single target inside the project ?

If you can't get it work, can you please attach a minimalized project-file where this happens and please, please post the general stuff as needed for almost all answer:
C::B revision, OS and version, compiler and version ...
« Last Edit: August 27, 2012, 06:31:55 am by jens »