Author Topic: How enter filenames in CB to use with wxSmith/wxWidgets on different builds  (Read 2463 times)

Offline seahawkibiza

  • Multiple posting newcomer
  • *
  • Posts: 28
Problem is the following:

The Project was formerly build with CB 3.12, wxWidgets 2.9.4 under Windows.

Now I must make some ports to Linux/MacOS etc...

The filenames on this platforms are quite different. So If I use a image_Button i.e., I enter in the wxSmith Form a relative path to the image., under Windows i.e. ./images/button.png
But if I compile under Linux this is wrong.
In the code I cant change, because this code is automactly build from wxSmith.

So, what for a system should I use to make the depencies on different platforms correctly?


Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
But if I compile under Linux this is wrong.
I just suggest you that you should post what is exact problem under Linux. "wrong" shows "nothing" here.  :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline seahawkibiza

  • Multiple posting newcomer
  • *
  • Posts: 28
It´s not a problem of Linux nor Windows, it´s a generall problem.

Possible I don´t explain correctly, i will try again:

1. I have a project with targets for Linux and Windows.
2. I use wxSmith for the GUI
3. If I use a wxStsticBitmap, or a wxImageButton, I must specify the name/path of the picture.

Problem: The code was generated automaticly by wxSmith and uses the filename what I must write in.
Under Windows must be the path like .\images\bitmap.bmp under Linux like ./image/bitmap.bmp

So if I compile for the other port I must change in all elements used by wxSmith the paths.

How can I do this correctly?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Have you tried to specify linux paths on windows?
Internally the windows apis use the proper slashes.  ;D
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]