ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It looks like you're not including the header that provides the prototype for that function. Can you provide the rest of your code, please? We don't want to have to guess.
Also, please try to use more descriptive thread titles in future. Something like "Solaris Studio C++: The function ... must have a prototype" would have been better.
OK, so you need to include the header that contains the signature for ShowMessage(). If this ShowMessage() function is in the same file as main(), then you have two options.
1. Put the function before main():
Code:
ShowMessage()
{
...
}
int main()
{
...
}
2. Leave the function after main(), but include a prototype, e.g.
Thanks a lot. In Visual C++, there is one given function like MessageBox. Do we have the equivalence for it in Solaris studio C++? Before this, I thought ShowMessage is the equivalent one for MessageBox.
I don't know, as I've never used Solaris Studio. Perhaps check their documentation. As an aside, you might want to also consider using, e.g. Qt to generate dialog boxes. At least that way, it'd be more portable between compilers.
It looks like Qt supports Visual C++, yes. If you don't know anything about Qt, it's a whole "application framework" that provides with the ability to do, e.g. multi-threading, database access, as well as GUIs. There's more info on the Qt website.
Did you try installing Qt already? Obviously it's not going to be on your system if not. Obviously, as well, you need to tell the compiler where to find the headers and library files.
See the download page here. I assume the Windows online (or offline) installer is what you want. You might want to install the Visual Studio add-in as well, though I don't know as I don't use Windows.
The Qt installation on your system was likely compiled with the GNU compiler. I've never tried, but I don't know whether it's possible to make use of libraries built with a different compiler. One issue you may have is to do with name mangling (see the Wikipedia article on it). So, this may mean you need to first build Qt with Solaris Studio. Is there a reason for you not to use g++?
Also, is it possible to edit your thread title? If not, ask a mod to do it. Hopefully that will help attract someone more able to help you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.