Running the C program of the wind module

3 posts / 0 new
Last post
Running the C program of the wind module


I have been trying to run the SAM's C code generated in command prompt. I have used the following command

gcc -o Golden Golden.c

Golden is my file name. However, I have received the error of "undefined resources" which is mostly related to the sscapi.h header file.
Could you please help me about this?


Paul Gilman

Dear Mohammad,

Please be sure that you are using the same operating system to generate the code from SAM and to run the C program. For example, if you are running the C program in Linux, you should use the Code Generator in the Linux version of SAM to be sure that the code package it creates is for the right operating system.

Best regards,

Paul Gilman


I just tested the win32 version of the 2018.11.11 release with the default PV/Residential C code generation using mingw 32 bit version on Windows 10. The folder with the code generation has the sscapi.h and appropriate ssc.dll files to run. I matched the results in SAM using the commands in the attached image.

Looking at your command, you are missing the -lssc from the build statement.

For reference, the generated Makefile for the C build is:

ifdef SystemRoot
RM = del /Q
EXT = .exe
CIFLAGS = -I.. -L.
LFLAGS = -lssc
#x64 SET PATH=c:\MinGW64\bin;%PATH%
#win32 SET PATH=c:\MinGW\bin;%PATH%
CCCOMP = gcc
PF = $(shell uname)
ifneq (,$(findstring Darwin, $(PF)))
VERS = $(shell sw_vers -productVersion)
EXT = .dylib
ifneq (,$findstring(Linux, $(PF)))
CIFLAGS = -I.. ./
EXT = .o
RM = rm -f
CCCOMP = gcc
LFLAGS = -ldl
PROJ_NAME = untitled
all :
clean :
@echo "Please check the settings for your system.Your system may not be supported.Please contact"

Let us know if you still are running into issues with the C code.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer