News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

undefined reference to `GetSaveFileNameA@4'|

Started by mrkaban, July 11, 2017, 05:55:39 PM

Previous topic - Next topic

mrkaban

Hello dear forum users! Just want to apologize for my English. Also I apologize for being just a beginner.

Faced such a mistake
Quote\main.cpp|198|undefined reference to `GetSaveFileNameA@4'|

Here is the function in which the problem arises
void newGradebookDialog( HWND hwnd, TCHAR file[] )
{
   OPENFILENAME ofn;

  TCHAR saveFileName[MAX_PATH] ="";

   ZeroMemory( &ofn, sizeof( ofn ) );

    ofn.lStructSize = sizeof(OPENFILENAME);
    ofn.hwndOwner = hwnd;
    ofn.lpstrFilter = "CSV File (*.csv)\0*.csv\0";
    ofn.lpstrFile = saveFileName;
    ofn.nMaxFile = MAX_PATH;
    ofn.lpstrDefExt = "csv";
    ofn.Flags  = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
    ofn.lpstrTitle = "Export to CSV";

if(GetSaveFileName(&ofn))
  strcpy(file,saveFileName);
}


Yes, the development environment points to the next line

if(GetSaveFileName(&ofn))

Thankful in advance for any help! If the topic did not create the right place, I apologize.

stahta01

Read the rules and look to this link http://www.cplusplus.com/forum/windows/72278/

Link to rules http://forums.next.codeblocks.org/index.php/topic,9996.0.html

If  you can NOT figure out where to enter the library name ask in this thread.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

mrkaban

Thank you very much! I'm sorry, I could not find this page myself.

Thank you very much, it helped!