Getting started with AspectC++ - c++

I do think that some of my problems concerning adding new functionality to old C++ code can be solved elegantly using AOP. Now, my first idea was to download AspectC++ and just start working. However, it doesn't seem to be that simple:
The Visual Studio integration thingy by pure systems has been updated for the last time about 5 years ago, adding support for VS '05. '10 (which I'm using) isn't detected during installation which in turn results in the installation being canceled.
ACDT was updated the last time Feb '07, Eclipse 3.2 being the last one supported, installation on current Eclipse fails.
Simply trying to compile the examples that come with AspectC++ doesn't work either:
username#username-VirtualBox:/media/sf_Temp/aspectc++$ make
make -C examples/coverage
make[1]: Entering directory `/media/sf_Temp/aspectc++/examples/coverage'
Compiling main.cc
make[1]: /media/sf_Temp/aspectc++/ag++: Command not found
make[1]: *** [Junk/main.o] Error 127
make[1]: Leaving directory `/media/sf_Temp/aspectc++/examples/coverage'
make: *** [coverage.make] Error 2
username#username-VirtualBox:/media/sf_Temp/aspectc++$
This "command not found" is weird, as simply running ag++ works (albeit it then of course complains about having no input files).
Soooo ... I'm kind of lost now. Any help on where to find a working manual for performing the first steps or some hint concerning what I'm doing wrong would be appreciated. Or is AspectC++ just too outdated/unusable/whatever for people to use it (which would explain the lack of some simple first-steps-manual which usually can be found by the hundreds)?
Thanks in advance.

I'm the AspectC++ project leader. If you need help, the best way is to subscribe to the AspectC++ user mailing list (visit www.aspectc.org and click on "support") and post a question there. It is not possible to be aware of all questions being posted anywhere on the web. Sorry. Yet, you are really welcome on our mailing list! :-)
In your special case, the error message sounds as if ag++ hadn't found ac++. These two binaries have to reside in the same directory. ag++ is just a wrapper that calls ac++, which performs the actual code transformation, and g++ for the compilation into an object file.

Related

mingw32-make access denied when building wxWidgets

I get an error when I execute mingw32-make in cmd with the makefile.gcc found in the build\msw folder of the wxWidget decompressed zip. I followed the steps shown in this tutorial video.
The error is:
make (e=5): Acceso denegado.
mingw32-make: [makefile.gcc:5354: clean] Error 5 (ignored)
I tried adding "Everyone" with total control to the security tab in the properties option of the folder in which I had decompressed wxWidgets.
I changed the same option for make.exe file in C:\msys64\mingw64\bin
I read that it could be the antivirus, I'm using Windows Defender, I switched off the real time protection but it didn't change anything.
First of all, this is not a fatal error, as indicated by "(ignored)" at the end, so it's not clear what your actual problem is -- does the library get compiled or not?
Second, to debug problems such as this one, you could use the Process Monitor tool where you can find out accessing which file exactly triggers this error -- this could give you at least some idea. Without knowing it, it's really impossible to know what goes wrong on your machine.

Can't make raylib, receives makefile error 576: recipe for target 'rmodels.o' failed

I am trying to use MinGW to compile the raylib package, but it's not going very good. It gives me this error:
cc1.exe: some warnings being treated as errors
Makefile:576: recipe for target 'rmodels.o' failed
mingw32-make: *** [rmodels.o] Error 1
This happens after i run:
mingw32-make PLATFORM=PLATFORM_DESKTOP
What am i doing wrong, what do i need to fix to make this work?
I think the developer solved the case a couple of days ago. If you're sure that it's the right error, here is the link to the comment from the developers' GitHub:
https://github.com/raysan5/raylib/issues/2137#issuecomment-968128325
He said it might be an issue with your current version of MinGW. There is a possibility that it's outdated.
Old thread, but for people with this problem in the future, I created a fork that fixed it for me. https://github.com/jamieengel011/raylib.

Build issue when running `make -j` - 'je_malloc' attribute directive ignored

Building rocksdb on my Ubuntu 20.04 box. I get the following error:
In file included from db/malloc_stats.cc:16:
./port/jemalloc_helper.h:63:29: error: 'je_malloc' attribute directive ignored [-Werror=attributes]
63 | __attribute__((__weak__));
| ^
I'm compiling using a simple make -j and I have all the listed dependencies installed, including libjemalloc-dev, but I've tried uninstalling it to no avail. gcc version is 9.3.0. Reinstalling it as well. These attribute directives are an area of C++ I'm not at all familiar with and I have no idea how to diagnose this problem. If I pass DISABLE_WARNING_AS_ERROR, I end up with linker errors, so clearly this error is meaningful. Notably, I was able to build this quite recently on this machine, and I don't recall changing anything that would have affected this. I did system updates, but nothing else that would possibly cause this that I know of. I've checked previous commits of rocksdb and I get the same error so the problem is definitely on my end somehow, but I've checked with coworkers and none of them have this problem. Any ideas or advice on how to diagnose this issue would be appreciated.
EDIT: I've just tried running make alone, and while it took forever, the build succeeded. This is not practical and I'm still at a complete loss as to how to diagnose this issue.
EDIT 2: The successful build with make is not consistent, though I am confident that it succeeded at least once. When it doesn't succeed I get the same error as above.

link against a legacy library: -lgfortranbegin from a premade makefile

I got some trouble trying to compile a programm developed by some researcher supposed to compute in a very precise way fourier transform and some other useful operation scientific paper here, whereas all the files needed and the makefile are provided.
I use gcc and a version of ubuntu available on windows10 (18.04), so, I linked all the librabries needed by the program and called in the pre-made makefile (fftw, lapack, gfortran..) everything is ok untill here, but once I tried to compile I got the error message:
/usr/bin/ld: cannot find -lgfortranbegin
collect2: error: ld returned 1 exit status
Makefile:38: recipe for target 'furian_main' failed
make: *** [furian_main] Error 1
After a few research it appears that libfortranbegin is a legacy code and no more available(source: here ) ..
So my question is: is it possible for me to compile my program without this legacy library (somme people say that we could get rid off this library, but I didn't understand what they do .. here)
Or should I do some update or use another library ?
Thank you for your time and consideration :)
The usual way of solving this is the following one:
remove the -lgfortranbegin
check the new link errors and look at what source file from the original source code implemented this feature
add this source file to your repository and your build and go back to step 2.
Be aware that it may still not work in the end, but hopefully you will be able to have the missing symbols.

How to compile atanks from windows?

I'm starting to learn C++ to make a game, I compiled some little programs and it worked fine to learn. Now I want to compile a game and learn how it was done.
The game I'm trying to compile is ATANKS (https://libregamewiki.org/Atanks).
First problem I have is the makefile contains an instruction on the target WINUSER that gives me error (it doesn't found the directory INSTALLDIR), I tried to compile manually entering SRC directory and run MAKE -f makefile.windows, it start to compile and stops with this error:
c:/tdm-gcc-64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-min
gw32/bin/ld.exe: atanks.o: bad reloc address 0x20 in section `.data'
collect2.exe: error: ld returned 1 exit status
make: *** [../atanks.exe] Error 1
Because a comment in the file atanks.rc I asume this was writed using DEV-C++ but it hasn't the .DEV project file.
Some info:
I'm using windows 7 64 bits.
I have installed DEV-C++, but for my game I'm using CODEBLOCKS.
Installed TDM-GCC-4.8.1-3 and allegro-4.4.2-mingw-4.5.2
Installed make-3.81
The PATH variable is: PATH=c:\TDM-GCC-64\bin\;"c:\Program Files (x86)\GnuWin32\bin\";
Other thing I tryed is making a CODEBLOCKS project, it seems to go but give me some errors too.
Thanks in advance and forgive me the bad english :)
(maybe someone can recommend me a forum to ask more, better if the language is spanish)
Someone on a IRC Channel help me to solve it, a little change on the makefile and use a 32 bit compiler instead 64 bit one was the solution.