how to solve undefined reference on fortran codeblocks? - fortran

I am trying to use fortran 90 and so i installed code blocks ide and i downloaded mingw compiler too and all library related to them .i did compiler setting as shown but unfortunately some errors occur
please help me how to fix it

Related

VSCode missing std::as_const()?

I have double checked several times that I am running either C++17 or above, yet this problem keeps occurring and I really don't understand why.
I am simply trying to call a const member function by using std::as_const(), which shouldn't be causing any fuss. Maybe it's missing from the utility library? But how could that be?
If anyone has an idea why this is happening I'd appreciate an answer.
VSCode telling me Utility library doesn't have std::as_const()
To summarize the back and forth in the comments:
Visual Studio Code relies on an external compiler to build and analize sources
Your compiler is the one that is likely old, not Visual Studio Code
Verify that your compiler is current
Update to a new compiler by upgrading MinGW.
In this case OP had an old compiler gcc 6.3.0 from Dec/2016 that did not support the features he wanted.

How do I link a library in VSCode?

I'm trying to include curses.h and some functions from that lib (specifically detecting a keyboard hit without stopping), but whenever I try, it gives the error "symbols not found." I'm assuming that this is because the clang++ compiler sees curses.h as a C library. I've gathered I need to link curses.h, but I don't know how and I could not find any real guides.
I'm writing a program in C++ using VSCode and clang++ on a mac. Any help is appreciated.
For anyone else who has this problem- my clang version was outdated. It was installed, so after a brief check, I thought all was good. However, it was not able to compile (nor find some libs for some reason) the newer versions of C++. Installing the latest version of clang fixed all issues.

compiling c and c++ code together as one .exe file in Visual Studio 2012

I am trying to port a piece of software from Linux to Windows. Actual software is written primarily in C++ and significant code is in C language. I tried to compile this code using Visual Studio 2012 (because I am using windows 2007) but at linking time I am getting many errors which says the function calls in C files are unknown entries. This software compiles, links and run fine on Linux so there are no issues with include of or anything silly like that.
Has anyone run into this issue? Does anyone know how to resolve it?
Please note that I have to do a native port so cygwin or other mingw are not options for me.
Thanks for your help in advance.
Chances are, you are using some kind of Linux-specific library. The most obvious example would be unistd.h, which doesn't really have a direct equivalent in Windows.

matlab deploytool giving the error when trying to build c++ shared library

Error: An error occurred while shelling out to mbuild (error code = 9).
Unable to build executable.
I don't know why I'm getting this error? and what to do with it? I've already installed a c++ compiler on my machine. I'm trying to build the c++ shared library of my Matlab code, i.e. convert my m-file to c++ code, so that I can use it in my c++ compiler, but while using deploytool, I'm getting this error. someone please help me. thanks in advance.
I'm using matlab r2009b and the compiler for c++ is dev cpp.
Run mbuild -setup to select the compiler you have installed. Also make sure it is one of the supported ones from the mathworks website.

C++ Code::blocks difficulty compiling

I am quite new to programming, and was working on a project at school which I hoped to take home and complete, and so I copied all the files (including that of code::blocks) thinking that I would simply be able to get it up and running quickly! However when I open the file and attempt to run the program I get a list of errors such as:
undefined reference to '_Unwind_SjLj_Register'
undefined reference to '_Unwind_SjLj_Resume'
undefined reference to '__gxx_personality_sj0'
undefined reference to '_Unwind_SjLj_Unregister'
and many more..
I assume this problem is likely caused by missing files since the computer I copied it from likely had a different directory. Or could it be because I am on a 64 bit version of windows 7, compared to the 32 bit version I was working on? (I really don't know just trying to think of some potential ideas).
Does anyone know of a solution? Should I simply uninstall and attempt to reinstall with minGW and SFML myself? Or is there a way to get around this without having to uninstall.
Thanks
Your compiler seem to be incompatible. If you've installed Qt with MinGW bundled together, you'll most likely have gotten MinGW 4.8.0 DW2 installed - it's the compiler for which a Qt package exists. On the other hand, if you've used the compiler that shipped with Code::Blocks you've most likely used the TDM 4.7.1 SJLJ compiler.
If you now try to use the same SFML libs or object files with from one compiler with another compiler, it won't work. Instead you'll have to option to either use the same compiler on both systems or compile everything freshly for both compilers.