News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

SmartWin test apps won't compile

Started by Buffalo, May 20, 2006, 12:49:27 PM

Previous topic - Next topic

Buffalo

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?

Michael

Quote from: Buffalo on May 20, 2006, 12:49:27 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
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

Buffalo

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:

Michael

Quote from: Buffalo 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?

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
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

Buffalo

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...



mandrav

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

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

Btw. Mandrav

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

mandrav

Enable "Settings->Compiler and debugger->Compiler->Other->Compiler logging: Full command line" and post your build log here.

Quote from: Buffalo 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

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

Buffalo

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?

Michael

Quote from: Buffalo on June 15, 2006, 08:24:45 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
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]