Author Topic: SmartWin test apps won't compile  (Read 8815 times)

Buffalo

  • Guest
SmartWin test apps won't compile
« on: May 20, 2006, 12:49:27 pm »
I want to try out SmartWin, but run into some problems.
I read earlier threads regarding SmartWin here on CodeBlocks Forum, but they didn't help.
I have compiled SmartWin++ and all demos with MinGW, using the makefile included with smartwin.
I can start a new Smartwin project using the codeblocks template, and it compiles and runs fine. (some warnings though)
But if I open one of the test apps. ( I tried with canvas. )
The includes dosn't work. I tried import VCC project, didn't work either.
I have added the directories c:\SmartWin and C:\SmartWin\Include in Global compiler settings in CodeBlocks.
And I copied "libsmartwin.a" to C:\mingw\lib . (Advise from other thread)

The error occurs in WidgwtButton.h line 31:
#include "../MessageMapControl.h"

Error message:
C:\SmartWin\include\smartwin\widgets\WidgetButton.h:31: ../MessageMapControl.h: No such file or irectory
There are dozens like errors following.

How can I configure Codeblocks, to compile SmartWin++ Test apps, without having to configure a project for each individually?

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: SmartWin test apps won't compile
« Reply #1 on: May 20, 2006, 10:09:36 pm »
Error message:
C:\SmartWin\include\smartwin\widgets\WidgetButton.h:31: ../MessageMapControl.h: No such file or irectory

Hello,

The problem is that it cannot find the MessageMapControl.h file. Probably you have not added the correct include directory. Anyway, try under Settings-->Global compiler settings-->other and check one or both boxes "Explicitely add...". May be it can help.

Best wishes,
Michael

Buffalo

  • Guest
Re: SmartWin test apps won't compile
« Reply #2 on: May 20, 2006, 10:54:51 pm »
The includes should be correct, but apparently they are not.... ?
It should only be nescessary to include smartwin, and the lib, I suspect that either is not passed to compiler or linker?
Seems like Thomas and others had it running some time back, maybe something has changed since then?
Or maybe I missed something, reading the old threads.

When using the CodeBlocks templates, it is possible to create projects, that include stuff that is relevant for the particular project.
Is it possible, to use a template for existing code? Because the SmartWin template works fine.

It would be preferably to defining a lot of global/constant include directories, which could result in conflicts because one project might use includes meant for another type of project.

I hope I'm not speaking total nonsense here..  :lol:

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: SmartWin test apps won't compile
« Reply #3 on: May 20, 2006, 11:43:11 pm »
The includes should be correct, but apparently they are not.... ?
It should only be nescessary to include smartwin, and the lib, I suspect that either is not passed to compiler or linker?

May be the problem is that the start of search for the include files does not lead to one of the specified included directory (as a relative path is used). Normally the starting point is where the project file is located.

Best wishes,
Michael

Buffalo

  • Guest
Re: SmartWin test apps won't compile
« Reply #4 on: May 22, 2006, 10:34:46 am »
I am not sure what you mean..  :oops:

My smartwin is in default c:\smartwin, and my projects can be all over the place..  :shock:
I think it uses relative paths. If that is the problem, I have no idea how to fix it...
I guess I will have to make the global settings...



Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: SmartWin test apps won't compile
« Reply #5 on: May 22, 2006, 11:13:49 am »
Enable "Settings->Compiler and debugger->Compiler->Other->Explicitely add currently compiling file's directory to compiler search dirs" and try again.
Be patient!
This bug will be fixed soon...

Buffalo

  • Guest
Re: SmartWin test apps won't compile
« Reply #6 on: May 23, 2006, 10:39:14 am »
Thanks I wasn't aware of that setting, seems logical to do that.
Seems it solved it for compiler.  :P
But I get errors when linking.  :?
I tried to manually include needed libs for linker.
gdi kernel user and such...
It still won't link...

I copied a project file, generated by the smartwin wizard.
I then replaced the original filename in the project to the Canvas.cpp (path and all of course)
Opened that project, and it compiles and runs fine.  :P

So I guess it's OK, I just hoped there was an easier way to do it.

Btw. I have to choose build and run 2 times, because program dosn't run first time, but for some reason it does second time.
Seems the "error" instantiated from here, is causing program not to be run.
But it's not an error is it?
( I'm new to C++ )  :shock:

Buffalo

  • Guest
Re: SmartWin test apps won't compile
« Reply #7 on: May 23, 2006, 10:43:38 am »
Btw. Mandrav

I simply LOVE your Logo.
Extremely cool serious guy, trying to solve a very tough problem.  :P :P :P

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: SmartWin test apps won't compile
« Reply #8 on: May 23, 2006, 11:03:22 am »
Enable "Settings->Compiler and debugger->Compiler->Other->Compiler logging: Full command line" and post your build log here.

Btw. Mandrav

I simply LOVE your Logo.
Extremely cool serious guy, trying to solve a very tough problem.  :P :P :P

Kudos go to Thomas. He 's the artist :)
Be patient!
This bug will be fixed soon...

Buffalo

  • Guest
Re: SmartWin test apps won't compile
« Reply #9 on: June 15, 2006, 08:24:45 pm »
Hi, Sorry I took so long to come back.
I am experimenting with Ubuntu, seems like Linux has come a long way since last I tried it.

I am considering a complete move to Linux, So I guess it would be illogical to use Smartwin.
But maybe codeblocks will be great for Linux too?

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: SmartWin test apps won't compile
« Reply #10 on: June 15, 2006, 08:28:59 pm »
But maybe codeblocks will be great for Linux too?

Hello,

C::B IS great for Linux :D. IMHO, anyway. Give it a try and you will not be deceived :).

Best wishes,
Michael