History

compiling in emcc and linking in gcc, but emcc still gives mysterious linker error

Jack Atherton committed 7 years ago

Commit 4e4ce691 parent 028f3a623 files · +4214 −4206Browse files

Showing the changes to src/core/util_string.cpp (1 of 23 files). Show all

Unified · Split

src/core/util_string.cpp+24−24
@@ -365,28 +365,28 @@ done: · 364 unmodified lines
365365
366366 #include <glob.h>
367367
368−char* CreatePathByExpandingTildePath(const char* path)
369−{
370− glob_t globbuf;
371− char **v;
372− char *expandedPath = NULL, *result = NULL;
373−
374− assert(path != NULL);
375−
376− if (glob(path, GLOB_TILDE, NULL, &globbuf) == 0) //success
377− {
378− v = globbuf.gl_pathv; //list of matched pathnames
379− expandedPath = v[0]; //number of matched pathnames, gl_pathc == 1
380−
381− result = (char*)calloc(1, strlen(expandedPath) + 1); //the extra char is for the null-termination
382− if(result)
383− strncpy(result, expandedPath, strlen(expandedPath) + 1); //copy the null-termination as well
384−
385− globfree(&globbuf);
386− }
387−
388− return result;
389−}
368+//char* CreatePathByExpandingTildePath(const char* path)
369+//{
370+// glob_t globbuf;
371+// char **v;
372+// char *expandedPath = NULL, *result = NULL;
373+//
374+// assert(path != NULL);
375+//
376+// if (glob(path, GLOB_TILDE, NULL, &globbuf) == 0) //success
377+// {
378+// v = globbuf.gl_pathv; //list of matched pathnames
379+// expandedPath = v[0]; //number of matched pathnames, gl_pathc == 1
380+//
381+// result = (char*)calloc(1, strlen(expandedPath) + 1); //the extra char is for the null-termination
382+// if(result)
383+// strncpy(result, expandedPath, strlen(expandedPath) + 1); //copy the null-termination as well
384+//
385+// globfree(&globbuf);
386+// }
387+//
388+// return result;
389+//}
390390
391391 #endif // __PLATFORM_WIN32__
392392
@@ -430,8 +430,8 @@ std::string get_full_path( const std::string & fp ) · 37 unmodified lines
430430
431431 std::string expand_filepath( std::string & fp )
432432 {
433−#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__)
434− // no expansion in Windows systems
433+#if defined(__WINDOWS_DS__) || defined(__WINDOWS_ASIO__) || defined(__EMSCRIPTEN__)
434+ // no expansion in Windows systems or Emscripten
435435 return fp;
436436 #else
437437

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t