Hi Ulf;
Does it work? If so, great. If not, not so great.
You have one advantage over me, an integrated environment (Linux). I
have a mixture of Windows and Linux, and in this environment without
feedback, I'm lost.
I notice your compile command (cc -ggdb -fPIC -shared) puts the
generated object file into the same directory as the header and source
files. Was that your intent? One issue that I have is that I want to put
the generated object files in another directory. In order to do that, I
have to pass the file name to one of the g++ parameters (g++ -c -o
obj/<filename>) and there are no directions as to how to do this.
I guess a common issue would be a compile/build command that is large. I
haven't tried this so I don't know if a line continuation character ('\'
in Linux) has to be provided or whether the input 'line' extends to as
large as is needed. Another feature that needs experimentation.
But, if it works for you then that is great.
art
On 3/3/2025 4:33 PM, Ulf Zibis wrote:
Hi Art,
I now learned, that the `cc` option `-s` means "strip" (I copied the
command from elsewhere). When I omit it, the debug symbols, created by
option `-ggdb` were not removed again from the binary.
Now, what a surprise, I can debug my code with NetBeans. Wow, that's
great.
So now I have:
Compile Commands:
cc -ggdb -fPIC -shared
Build:
cc -ggdb -shared -fPIC media.c -o libmedia.so
mkdir -p /home/ich/.jpilot/plugins
mv libmedia.so /home/ich/.jpilot/plugins/
Clean:
rm -r /home/ich/.jpilot/plugins
Run:
jpilot -d
-Ulf
Am 03.03.25 um 17:33 schrieb slipbits:
Hi Ulf;
Way back in the bottom of this email, I asked about C/C++ support.
Some answers followed.
I work in a Windows environment and have cygwin (a Windows Linux)
with mingw and gcc.
There is no documentation of what is required for entries in "Compile
Command", "Build", "Clean" or "Run". So, I've tried different
versions of paths to reference the gcc toolset. So far, none have
worked, except for "Clean". What is more than puzzling is how to
specify what is being compiled to the compiler. In my case, I would
like to use something like "g++ -c -o obj/?" where the "?" is a
question as to how I can specify that the object file created goes to
a separate directory.
This means that I have given up. My current procedure is to use g++
directly in a script or by typing in a bash shell. I use:
g++ -c obj/$1 $1 in a bash script to compile a file, and
for i in *.cpp; g++ -c obj/$i.o $i 2>> error.log; done. To
compile everything and save the errors.
Don't really know what else to do. There are no descriptions to
follow, nothing to say "hey, this is the correct way to do things",
and there hasn't been since NB 8.0. Without any guidelines it becomes
a matter of experimentation. And when you run out of ideas, why then,
your done.
As a suggestion, if you are having undue difficulty then separate the
compile, build, run and debug tasks from NB and do it externally.
That allows you to go forward. Otherwise you may be experimenting for
a bit.
As another note, for referencing CCLS or clangd, go to tools ->
options -> C/C++. I have no idea whether it works but I use
"C:\cygwin64\usr\clangd\bin\clangd.exe". Note that there is a
selection you have to make at the bottom, "Preferred server".
And one more (snarky) comment. In my C++ setup, the "Run -> Compile
file" selection is grayed out, so even if I wanted to, I can't work
effectively.
As to debug, well, since I have never gotten compiles and builds to
work, I've never gotten as far as debugging. But if I had, there is
no information as to what debugger is being used, this effects the
compile phase, and I don't think that there is an option to allow
specification of what debugger you want. There is also, no way to
specify search paths, which in my case means that I have to change my
Windows environment PATH to include cygwin paths.
I've been asking for help for C/C++ setup for years, yep, years. I
would be willing to take a try at developing documentation but I have
never been able to get it to work so I can't write about anything but
failures.
If this all sounds like I'm frustrated, well, I am. And if it sounds,
or looks, like I'm not accurate in what I say, it's because I don't
know better. But, I truly do like NB, and I do think that the people
who are movers and shakers have done a great job, and one which I
would like to thank them for. But the developers attention have
shifted from C/C++.
art
On 3/2/2025 6:07 PM, Ulf Zibis wrote:
Hi Brad,
it seems you have good luck with it.
I have set up a small C project with NB 24 on Ubuntu to build a
library. Package ccls is installed. Must i be somehow registered in NB?
The build command is:
cc -s -ggdb -shared -fPIC media.c -o libmedia.so
When I set a breakpoint at some line and run "Debug", the program
does not stop at that line, and I don't see any variables.
How does that work?
Can someone tell me where the projects properties are saved?
I don't see a folder like .nbproject in my projects folder.
Regards,
Ulf
Am 24.11.24 um 18:50 schrieb Bradley Willcott:
There is a plug-in: CPPLite Kit.
I am using NB23.
This kit needs either: ccls, or clangd.
I'm running on Linux and using ccls.
Regards,
Brad.
On 23/11/24 23:58, Ron Patton wrote:
Have you received an answer? I'm still on version 12 due to this
issue. I tried moving on from version 12 and the upgrade failed
miserably. The C/C++ issue was one of the impediments.
73,
Ron / W4MMP
On 11/8/2024 11:41, slipbits wrote:
Is C/C++ still supported? I've been trying to use Netbeans as my
C/C++
IDE and have so far been unsuccessful. I have used it for Java
with no
issues, but I can't seem to get it going for C/C++. Is there any
documentation or FAQ that can be used as a guideline for setup?
thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists