Author Topic: Help with wxLED component  (Read 20445 times)

Offline nishalns

  • Multiple posting newcomer
  • *
  • Posts: 22
Help with wxLED component
« on: April 14, 2013, 02:07:54 pm »
I want to use wxLED component in my wxWidget projects developed using code::blocks 12.11.

When I added the wxLED component to the window, the compiler flagged an error that "led.h" header file was missing. So, I downloaded the header file and c++ source file from sourceforge and copied the led.h file to "include/wx/led.h" in this wxsmith directory.

Now, when I try to build the program it gives me a  whole lot of errors that the constructors and functions used for the led component are missing. So, I tried copying "led.cpp" (which was also downloaded from sourceforge along with "led.h") to the "src" folder in the wxWidgets directory.

Where should I place this "led.cpp" file and what steps should I take to fix this problem????

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Help with wxLED component
« Reply #1 on: April 14, 2013, 02:28:48 pm »
Please remove your duplicated posts, thanks.
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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Help with wxLED component
« Reply #2 on: April 14, 2013, 02:31:45 pm »
How to remove a duplicate post???
There is a "Remove" button in the right top side of your post.
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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Help with wxLED component
« Reply #3 on: April 14, 2013, 02:34:01 pm »
first of al it's not C::B related! This is a simple question of not understanding how c (c++) works (especially the compiling step), so i recommend you to read a good c tutorial (book).
Some help can be found here:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29


or simply add the cpp file to your project....

Offline nishalns

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: Help with wxLED component
« Reply #4 on: April 15, 2013, 12:40:34 pm »
Oh! didn't realize that....

Well, Thank you!!!!! :)

Offline nishalns

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: Help with wxLED component
« Reply #5 on: April 15, 2013, 02:26:42 pm »
I wanted to use the wxLED component in one of my projects... so i added it to the project frame in code::blocks ide. But it flagged errors that "wx/led.h" file was missing... How do I fix this?????

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Help with wxLED component
« Reply #6 on: April 15, 2013, 03:20:11 pm »
But it flagged errors that "wx/led.h" file was missing... How do I fix this?????
Adjust your compiler include folder settings.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Help with wxLED component
« Reply #7 on: April 15, 2013, 04:32:34 pm »
@nishalns:

Please stop double and triple-posting the same question.
You have been told to remove the first double-post and it looks as if you have done it.
But for some reason you asked the same question a third time in a new thread.
I just merged the two open threads.

If you do not learn how to behave correctly in forums, you will get banned for a while.

Be warned !

Offline nishalns

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: Help with wxLED component
« Reply #8 on: April 16, 2013, 10:42:42 am »
@nishalns:

Sorry about that...I've signed up for a forum for the first time!!!!

But here the resources that I had downloaded didn't seem to work so I posted this question once again....

BethSandoval

  • Guest
Re: Help with wxLED component
« Reply #9 on: August 10, 2013, 04:01:04 pm »
I want to use wxLED component in my wxWidget projects developed using code::blocks 12.11.

When I added the wxled light component to the window, the compiler flagged an error that "led.h" header file was missing. So, I downloaded the header file and c++ source file from sourceforge and copied the led.h file to "include/wx/led.h" in this wxsmith directory.

Now, when I try to build the program it gives me a  whole lot of errors that the constructors and functions used for the led component are missing. So, I tried copying "led.cpp" (which was also downloaded from sourceforge along with "led.h") to the "src" folder in the wxWidgets directory.

Where should I place this "led.cpp" file and what steps should I take to fix this problem????

Hello friend were you able to use the wxLED component? I am trying to use it but not successful yet..Please reply thanks in advance:)
« Last Edit: August 11, 2013, 05:43:57 pm by BethSandoval »

Offline nishalns

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: Help with wxLED component
« Reply #10 on: August 17, 2013, 02:38:09 pm »
Hello friend were you able to use the wxLED component? I am trying to use it but not successful yet..Please reply thanks in advance:)

Yes I was. I downloaded the source files from https://sourceforge.net/projects/wxledplugin/files/wxSmithLed.zip/download and built them using codeblocks. I got some errors, but I was able to make appropriate modifications and build the library successfully. I would be happy to send you the ".o" file if you wish to...

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Help with wxLED component
« Reply #11 on: August 18, 2013, 12:00:44 am »
Hello friend were you able to use the wxLED component? I am trying to use it but not successful yet..Please reply thanks in advance:)

Yes I was. I downloaded the source files from https://sourceforge.net/projects/wxledplugin/files/wxSmithLed.zip/download and built them using codeblocks. I got some errors, but I was able to make appropriate modifications and build the library successfully. I would be happy to send you the ".o" file if you wish to...

i don't think that the .o file is usefull ;)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Help with wxLED component
« Reply #12 on: August 18, 2013, 07:17:18 am »
To use the wxLed component in your projects all you need to do is to copy the led.h/cpp from the C::B SVN source tree into your project folder and make use of it. Its very simple. Don't use the one from the wxSmithLed project on sourceforge - this is outdated.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline jean-raphael

  • Single posting newcomer
  • *
  • Posts: 4
Re: Help with wxLED component
« Reply #13 on: March 24, 2022, 10:31:39 am »
were is led.h ? i d'ont have anything like that in my wxwidget build ? (stable 3.0.5)
« Last Edit: March 24, 2022, 10:34:50 am by jean-raphael »

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Help with wxLED component
« Reply #14 on: March 24, 2022, 12:45:15 pm »
The wxLED name is very misleading, it is not part of wxWidgets.

If you reread the last message before yours:
Quote
copy the led.h/cpp from the C::B SVN source tree

That means wxLED is here

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: Help with wxLED component
« Reply #15 on: March 24, 2022, 11:00:37 pm »
@miguel if you check out the posts from jean-raphael do you think it's a bot? I think the account is a bot.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Help with wxLED component
« Reply #16 on: March 25, 2022, 01:25:42 am »
@miguel if you check out the posts from jean-raphael do you think it's a bot? I think the account is a bot.

 I also think he is a robot.
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 Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Help with wxLED component
« Reply #17 on: March 25, 2022, 02:18:30 pm »
IMHO the posts look too elaborated, I think it is more a troll than a bot. I will check next week if his/its messages have been edited to add the usual spam.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: Help with wxLED component
« Reply #18 on: March 25, 2022, 11:08:44 pm »
I did not think of a troll.

You could also wait and see if there is a reply to these last few posts to say "I am not a ..... or _____".

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: Help with wxLED component
« Reply #19 on: March 31, 2022, 10:35:08 am »
Troll.....